//
//  SecondViewController.m
//  RCA24
//
//  Created by Raul Pacurar on 2/4/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "InfoViewController.h"
#import "ActeDaunaViewController.h"
#import "TarileCuCarteaVerdeViewController.h"

@implementation InfoViewController
@synthesize acteInCazDeDaunaButton;
@synthesize tarileCuCarteaVerde;
//@synthesize navigationController;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = NSLocalizedString(@"Info", @"Info");
        self.tabBarItem.image = [UIImage imageNamed:@"info"];
    }
    return self;
}
							
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.title = @"Info";
	// Do any additional setup after loading the view, typically from a nib.
    UIImage * backgroundPattern = [UIImage imageNamed:@"bg-app.png"];
    [self.view setBackgroundColor:[UIColor colorWithPatternImage:backgroundPattern]];
}

-(void)dealloc
{
    [tarileCuCarteVerde release];
    [acteInCazDeDaunaButton release];
 //   [navigationController release];
    [super dealloc];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated
{
	[super viewWillDisappear:animated];
}

- (void)viewDidDisappear:(BOOL)animated
{
	[super viewDidDisappear:animated];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

#pragma mark - IBActions

-(IBAction)buttonPressed:(id)sender
{
    if (sender == acteInCazDeDaunaButton)
    {
        ActeDaunaViewController *acteViewController = [[ActeDaunaViewController alloc] init];
        
        [self.navigationController pushViewController:acteViewController animated:true];
      //  [self presentModalViewController:acteViewController animated:YES];
        
        [acteViewController release];
    }
    else if (sender == tarileCuCarteVerde)
    {
        TarileCuCarteaVerdeViewController *tarileCuCarteaVerdeViewController = [[TarileCuCarteaVerdeViewController alloc]init];
        [self.navigationController pushViewController:tarileCuCarteaVerdeViewController animated:YES];
      //  [self presentModalViewController:tarileCuCarteaVerdeViewController animated:YES];
        [tarileCuCarteaVerdeViewController release];
    }
}

@end
